Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

daily backup - allow to disable succesful backup notifications #3516

Merged
merged 1 commit into from
Oct 18, 2023

Conversation

szaimen
Copy link
Collaborator

@szaimen szaimen commented Oct 9, 2023

Close #3485
Close #2180
Close #985
Close #484

@szaimen szaimen added 2. developing Work in progress enhancement New feature or request labels Oct 9, 2023
@szaimen szaimen added this to the next milestone Oct 9, 2023
@szaimen szaimen force-pushed the enh/3485/disable-successful-backup-notifications branch from ed2f342 to 4acfeff Compare October 10, 2023 10:11
Signed-off-by: Simon L <szaimen@e.mail.de>
@szaimen szaimen force-pushed the enh/3485/disable-successful-backup-notifications branch from 4acfeff to 258f668 Compare October 10, 2023 10:12
@szaimen szaimen added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Oct 18, 2023
@szaimen szaimen marked this pull request as ready for review October 18, 2023 11:59
@szaimen szaimen merged commit 9ac5284 into main Oct 18, 2023
@delete-merged-branch delete-merged-branch bot deleted the enh/3485/disable-successful-backup-notifications branch October 18, 2023 11:59
@chippey5
Copy link

For anyone who is looking how to deactivate the successful backup notifications:

  1. Go to the AIO interface, to the Backup and restore section
  2. Press Click here to reveal all backup options (it also includes an option for automatic updates)
  3. Go to the section Daily backup and automatic updates. Disable daily backups, if activated.
  4. Here's the checkbox introduced to disable notifications: _("Send notifications about successful backups (notifications about unsuccessful backups will always be sent)"). Uncheck to have it disabled when activating daily backups

@davidSGE
Copy link

davidSGE commented Nov 5, 2024

@chippey5
I tried to follow this steps. However there seems to be no button to save the change. I unchecked the option "Send notifications about successful backups (notifications about unsuccessful backups will always be sent)".
Afterwards, no matter if I press "Submit Backup time", "Submit additional backup", "Create backup" or start the containers again, the notification-setting ist always ticked again automatically...
Found no other guide to disable the notifications than yours...

@chippey5
Copy link

chippey5 commented Nov 9, 2024

@davidSGE

Just tested this again (though I haven't waited until my daily automatic backup time yet), but once activated, the checkbox is not visible anymore, so ensure you actually activate automated backups again by pressing "Submit backup time". I realized this wasn't as clear in my previous answer.

@stargolems
Copy link

@chippey5 I tried to follow this steps. However there seems to be no button to save the change. I unchecked the option "Send notifications about successful backups (notifications about unsuccessful backups will always be sent)". Afterwards, no matter if I press "Submit Backup time", "Submit additional backup", "Create backup" or start the containers again, the notification-setting ist always ticked again automatically... Found no other guide to disable the notifications than yours...

My AIO 10.0.0 shows the same behaviour: When I uncheck the option ""Send notifications about successful backups ..." and press "Submit Backup time", the setting is always switched on afterwards.

@chippey5
Copy link

@chippey5 I tried to follow this steps. However there seems to be no button to save the change. I unchecked the option "Send notifications about successful backups (notifications about unsuccessful backups will always be sent)". Afterwards, no matter if I press "Submit Backup time", "Submit additional backup", "Create backup" or start the containers again, the notification-setting ist always ticked again automatically... Found no other guide to disable the notifications than yours...

My AIO 10.0.0 shows the same behaviour: When I uncheck the option ""Send notifications about successful backups ..." and press "Submit Backup time", the setting is always switched on afterwards.

Let's break this down then, this is also tested from the latest (at the time of writing) AIO v10.1.1. For good measure, disable the automatic backups, uncheck the success notifications once more and then submit the automatic backup time. Then:

  1. SSH to your VM hosting Nextcloud-AIO
  2. Enter the master container: docker exec -it nextcloud-aio-mastercontainer /bin/bash
  3. Check the backup settings with: cat /mnt/docker-aio-config/data/daily_backup_time && echo ""

The latest command should output something like:

<your_submitted_backup_start_time>

successNotificationsAreNotEnabled

The 3rd (and last) line (this is where the master container gets its value from) dictates whether to send success notifications or not. BUT only if the 3rd line equals to successNotificationsAreNotEnabled it will skip sending notifications, any other value will enable the backup success notifications.

Two things I noticed however:

  1. The file is empty if you have automatic backups disabled
  2. When disabling automatic backups, the checkbox is automatically marked again by default before submitting it. It's worth noting that as long as you can see the automatic notification section, it means that you have automatic backups disabled. The checkbox status does not seem to be inherited from previous settings as the file is cleared when disabling the backups.

Hope this helps and clears some things out.

@michield
Copy link

Yes, the UI can do with some work here. I went through the steps to switch off the notifications, but when reviewing the page, it says

Daily backups will be created at 01:00 UTC. A notification about the result of the backup will be sent.

Even though, as in the post from @chippey5 successNotificationsAreNotEnabled is in the config file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants